<%@ page language="java" pageEncoding="utf-8" import="java.util.*"%>
<%@ include file="/common/taglibs.jsp"%>
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<title>分类和讨论区列表</title>
<%@ include file="/common/meta.jsp"%>
<head>
<body>

<form id=form name=form action="${ctx}/forum/index.action" method=post>
<table class=forumline cellspacing=0 cellpadding=3 width="100%" border=0>
	<tbody>
		<tr>
			<th class=thhead valign="middle" colspan=35>分类和讨论区列表</th>
		</tr>

		<c:forEach var="category" items="${ categories}" varStatus="status">
			<tr>
				<td class=catleft width="20%"><span class=cattitle>${category.categoryName
				}</span></td>
				<td class=catleft align="center" width="16%"><input
					class=mainoption
					onclick="window.location='${ctx }/forum/forumAdmin.action?method:categoryMoveDown&category.id=${category.id}';"
					type=button value=下移>&nbsp;</td>
				<td class=catleft align="center" width="16%"><input
					class=mainoption
					onclick="window.location='${ctx }/forum/forumAdmin.action?method:categoryMoveUp&category.id=${category.id}';"
					type=button value=上移>&nbsp;</td>
				<td class=catleft align="center" width="16%"><span class=gen>
				<a id=categoryedit
					href="${ctx }/forum/forumAdmin.action?method:editCategoryForm&category.id=${category.id} ">编辑分类名称</a>
				</span></td>
				<td class=catleft align="center" width="16%"><span class=gen>
				<a id=categoryedit
					href="${ctx }/forum/forumadmin.action?method:deleteCategory&category.id=${category.id}">删除分类</a>
				</span></td></tr>
               
				<tr>
					<td class=row1 colspan=6>
					<table width="100%" border="0">
						<tbody>
							<c:forEach var="forum" items="${category.forums}"
								varStatus="status">
								<tr>
									<td class=row1 width="20%"><span class=gen><a
										href="${ctx}/forum/forum.action?method:listTopics&forumId=${forum.id}">${forum.forumName
									}</a></span></td>
									<td class=row1 width="16%" align="center"><input
										class=mainoption
										onclick="window.location='${ctx }/forum/forumAdmin.action?method:forumMoveDown&forum.id=${forum.id}';"
										type=button value=下移>&nbsp;</td>
									<td width="16%" align="center"><input class=mainoption
										onclick="window.location='${ctx }/forum/forumAdmin.action?method:forumMoveUp&forum.id=${forum.id}';"
										type=button value=上移>&nbsp;</td>
									<td class=row1 width="16%" align="center"><span class=gen>
									<a id=categoryedit
										href="${ctx }/forum/forumAdmin.action?method:editForumForm&forum.id=${forum.id}">编辑此讨论区</a>
									</span></td>
									<td class=row1 width="16%" align="center"><span class=gen>
									<a id=categoryedit
										href="${ctx }/forum/forumadmin.action?method:deleteForum&forum.id=${forum.id}"
										onclick="return(confirm('确定要删除${forum.forumName}？'))">删除此讨论区</a>
									</span></td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
					</td>
				</tr>


		</c:forEach>
		<tr align=center>
			<td class=catbottom colspan=6 height=28><input class=mainoption
				id=btn_insert
				onclick="document.location = '${ctx}/forum/categoryEditForm.jsp';"
				type=button value=建立新分类 name=button> &nbsp;&nbsp; <input
				class=mainoption id=btn_insert
				onclick="document.location = '${ctx}/forum/forumadmin.action?method:createForumForm';"
				type=button value=建立新讨论区 name=button> <input
				class=mainoption id=btn_insert
				onclick="document.location = '${ctx}/forum/forum.action';"
				type=button value="浏览 "></td>
		</tr>
	</tbody>
</table>
</form>
</body>
</html>
